import React, { useEffect } from 'react'
import { connect } from 'react-redux'
import { getSingerList } from '@/store/actionCreators'

function Singers(props) {
    const { singer, getSingerDataDispatch } = props;
    useEffect(() => {
        getSingerDataDispatch()
    }, [])
    return (
        <div>
            Singers
        </div>
    )
}
const mapStateToProps = (state) => {
    return {
        singer: state.singer.singer
    }
}
const mapDispatchToProps = (dispatch) => {
    return {
        getSingerDataDispatch() {
            dispatch(getSingerList())
        }
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Singers)